<template>
  <div class="moliVideoMain">
    <div class="moliVideo" v-for="(item,index) in videoList" :key="index" ﻿@tap="clickDetails(item.id)">
      <p>{{item.title}}</p>
      <div>
        <div class="playImg">
          <img :lazy-load="true":src="picPre + item.banner" alt="">
          <div>
            <span class="iconfont iconbofangkaobei1"></span>
          </div>
        </div>
        <div class="moliVideo-content">
          <div>
            <div class="moliVideo-content-num">
              <div>
                <i class="iconfont iconbofangkaobei"></i>
                <p>{{item.play_num}} 播放</p>
              </div>
              <div>
                <i class="iconfont icontiezi"></i>
                <p>{{item.posts_num}} 发帖</p>
              </div>
            </div>
            <p>发布时间：{{item.created_at}}</p>
          </div>
        </div>
      </div>
    </div>
  </div>

</template>

<script>
  export default {
    name: "index",
    props: {
      videoList: {
        type: Array
      }
    },
    data() {
      let that = this;
      return {
        picPre: that.$api.picPre,
      }
    },
    methods: {
      clickDetails(data) {
        this.$emit("toDetails", data);
      }
    }
  }
</script>

<style scoped>
  .moliVideoMain {
    padding: 0 30rpx;
  }

  .moliVideo {
    padding: 30rpx 0;
    border-bottom: 1rpx solid #EEEEEE;
  }

  .moliVideo > p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    color: #323232;
    font-size: 26rpx;
    font-weight:500;
  }

  .moliVideo > div {
    background-color: #F7F7F7;
    border-radius: 20rpx;
  }

  .playImg {
    width: 100%;
    position: relative;
    margin-top: 28rpx;
  }

  .playImg > img {
    width: 100%;
    height: 389rpx;
    border-radius: 20rpx;
  }

  .playImg > div {
    width: 100%;
    height: 389rpx;
    background-color: #373D3E;
    opacity: 0.52;
    text-align: center;
    line-height: 420rpx;
    border-radius: 20rpx;
    position: absolute;
    top: 0;
    left: 0;
  }

  .playImg > div > .iconbofangkaobei1 {
    font-size: 88rpx;
    color: white;
  }

  .moliVideo-content {
    padding: 17rpx 20rpx 14rpx;
    display: flex;
    justify-content: space-between;
  }

  .moliVideo-content > img {
    width: 56rpx;
    height: 56rpx;
  }

  .moliVideo-content-num {
    display: flex;
    line-height: 40rpx;
  }

  .moliVideo-content-num > div {
    display: flex;
    font-size: 24rpx;
    color: #969696;
  }

  .moliVideo-content-num > div > img {
    width: 24rpx;
    height: 25rpx;
    margin-right: 10rpx;
  }

  .moliVideo-content-num > div:first-child {
    margin-right: 35rpx;
  }

  .moliVideo-content-num + p {
    font-size: 18rpx;
    color: #969696;
  }

  .iconfont {
    color: #EF5A56;
    font-size: 26rpx;
    margin-right: 9rpx;
  }
  .icontiezi{
    color: #FB9230;
  }
</style>
